﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Administrator/MasterPage.master" AutoEventWireup="false" CodeFile="userRightEdit.aspx.vb" Inherits="Administrator_userRightEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
      
            <table style="width: 100%;">
                <tr>
                    <td align="right" style="height: 24px; width: 140px">
                        <asp:Label ID="lblUserRight" runat="server" CssClass="control" 
                            Text="รหัสกลุ่มสิทธิ์"></asp:Label>
                        &nbsp;:</td>
                    <td align="left" style="height: 24px; width: 377px;">
                        <asp:TextBox ID="txtUserRightDeptCode" runat="server" CssClass="control" 
                            Enabled="False" Height="20px" MaxLength="2" Width="50px"></asp:TextBox>
                        <asp:TextBox ID="txtUserRight" runat="server" CssClass="control" Height="20px" 
                            MaxLength="18" Width="170px"></asp:TextBox>
                    </td>
                    <td align="left" style="height: 24px">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" style="width: 140px">
                        <asp:Label ID="lblUserRightDesc" runat="server" CssClass="control" 
                            Text="ชื่อกลุ่มสิทธิ์"></asp:Label>
                        &nbsp;:</td>
                    <td align="left" style="width: 377px">
                        <asp:TextBox ID="txtUserRightDesc" runat="server" CssClass="control" 
                            Height="20px" MaxLength="100" style="margin-left: 0px" Width="361px"></asp:TextBox>
                    </td>
                    <td align="left">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" style="width: 140px">
                        <asp:Label ID="lblUserRightStatus" runat="server" CssClass="control" 
                            Text="สถานะ :"></asp:Label>
                    </td>
                    <td align="left" style="width: 377px">
                        <asp:RadioButtonList ID="rdolStatus" runat="server" 
                            RepeatDirection="Horizontal" Width="166px">
                            <asp:ListItem Value="1">ใช้งาน</asp:ListItem>
                            <asp:ListItem Value="0">ยกเลิก</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td align="left">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" style="width: 140px">
                        <asp:Label ID="lblRole" runat="server" Text="ระดับการเข้าถึงข้อมูล :"></asp:Label>
                    </td>
                    <td align="left" colspan="2">
                        <asp:CheckBox ID="chkRoleGHB" runat="server" CssClass="control" 
                            Text="Admin ธนาคาร" />
                        <asp:CheckBox ID="ChkRoleSys" runat="server" CssClass="control" 
                            Text="Admin ระบบ" />
                        <asp:CheckBox ID="chkRoleDept" runat="server" CssClass="control" 
                            Text="Admin ฝ่าย" />
                        <asp:CheckBox ID="chkRoleZone" runat="server" CssClass="control" 
                            Text="Admin เขต" />
                        <asp:CheckBox ID="chkRoleBranch" runat="server" CssClass="control" 
                            Text="Admin สาขา/ส่วนงาน" />
                        <asp:CheckBox ID="chkRoleUser" runat="server" Text="ผู้ใช้งาน" />
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 140px">
                        &nbsp;</td>
                    <td align="left" colspan="2">
                        <asp:GridView ID="grdDepartment" runat="server" AutoGenerateColumns="False" 
                            CellPadding="4" ForeColor="#333333" GridLines="None" ShowHeader="False" 
                            Width="700px">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:BoundField DataField="deptCode">
                                <ItemStyle Width="50px" />
                                </asp:BoundField>
                                <asp:BoundField DataField="deptname">
                                <ItemStyle HorizontalAlign="Left" Width="450px" />
                                </asp:BoundField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkDept" runat="server" 
                                            Checked='<%# iif(eval("DeptIsUse") is dbnull.value , false,iif(eval("DeptIsUse")=nothing,false, true)) %>' />
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" Width="20px" />
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                            <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <SortedAscendingCellStyle BackColor="#FDF5AC" />
                            <SortedAscendingHeaderStyle BackColor="#4D0000" />
                            <SortedDescendingCellStyle BackColor="#FCF6C0" />
                            <SortedDescendingHeaderStyle BackColor="#820000" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="3">
                        <asp:Button ID="btnSetUserRight" runat="server" CssClass="control" 
                            Text="ตั้งค่าสิทธิ์การใช้งาน" Width="164px" />
                        <asp:Button ID="btnOK" runat="server" CssClass="control" Text="บันทึก" 
                            Width="60px" />
                        <asp:Button ID="btnCancel" runat="server" CssClass="control" Text="ยกเลิก" 
                            Width="60px" />
                    </td>
                </tr>
            </table>
       
    </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

